bitkeeper revision 1.1159.1.209 (4163ed11XmoH7YafgdjHd_l9zZsOOg)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Wed, 6 Oct 2004 13:03:13 +0000 (13:03 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Wed, 6 Oct 2004 13:03:13 +0000 (13:03 +0000)
Update pteidx of disconnected va space even in shadow mode.

xen/arch/x86/memory.c

index 654ec044c73634cbc5a8ccd1f17eee72aa9c1ac6..956e61aa9ee8f36b701fce4e35948c1a1023cf68 100644 (file)
@@ -1776,12 +1776,15 @@ int ptwr_do_page_fault(unsigned long addr)
                 ptwr_flush(which);
             ptwr_info[cpu].ptinfo[which].l1va = addr | 1;
 
-            if (which == PTWR_PT_ACTIVE && likely(!current->mm.shadow_mode)) {
+            if (which == PTWR_PT_ACTIVE) {
                 ptwr_info[cpu].active_pteidx = va_mask;
-               /* disconnect l1 page (unnecessary in shadow mode) */
-               nl2e = mk_l2_pgentry((l2_pgentry_val(*pl2e) & ~_PAGE_PRESENT));
-               update_l2e(pl2e, *pl2e, nl2e);
-               flush_tlb();
+               if ( likely(!current->mm.shadow_mode) ) {
+                   /* disconnect l1 page (unnecessary in shadow mode) */
+                   nl2e = mk_l2_pgentry((l2_pgentry_val(*pl2e) &
+                                         ~_PAGE_PRESENT));
+                   update_l2e(pl2e, *pl2e, nl2e);
+                   flush_tlb();
+               }
            }
 
             ptwr_info[cpu].ptinfo[which].pl1e =